﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title - FCNS.ERP</title>
    @RenderSection("scripts", required: false)

    <script type="text/javascript">
        $(document).ready(function () {
            $("table").DataTable({
                "columnDefs": [
                    { "visible": false, "targets": 0 }
                ],
                //dom: 'Blftipr', buttons: [
                //   'excel'
                //],
                "lengthMenu": [[100, 200, -1], [100, 200, "全部"]],
                "order": [[0, "asc"]],
                "displayLength": -1,
                "drawCallback": function (settings) {
                    var api = this.api();
                    var rows = api.rows({ page: 'current' }).nodes();
                    var last = null;

                    api.column(0, { page: 'current' }).data().each(function (group, i) {
                        if (last !== group) {
                            $(rows).eq(i).before(
                                '<tr class="group ' + group + '"><td colspan="2" style="font-weight:bold;"><img src="/Content/Image/group_92px.png" style="width:24px;height:24px;" />' + group + '</td></tr>');

                            last = group;
                            $('.' + group).hide();
                            $('.group').show();
                        }
                    });
                }
            });

            $("table").on('click', '.group', function () {
                var vr = $(this).text().split("(")[0];
                $("tbody tr").each(function () {
                    $(this).hide();
                });

                $('.group').each(function () {
                    $(this).show();
                });

                $('.' + vr).each(function () {
                    $(this).show();
                });
            });

            //顶部菜单栏权限
            if ($("#NoClickId").attr("value") == "FCNS.ERP")
                return;

            var v1 = $("#NoClickId").attr("value");
            if (v1.indexOf("Basic") < 0) { $("#basic-menu").hide(); }
            if (v1.indexOf("Order") < 0) { $("#order-menu").hide(); }
            if (v1.indexOf("Pay") < 0) { $("#pay-menu").hide(); }
            if (v1.indexOf("Report") < 0) { $("#report-menu").hide(); }
            if (v1.indexOf("System") < 0) { $("#system-menu").hide(); }
            if (v1.indexOf("Mobile") < 0) { $("#mobile-menu").hide(); }
        });
    </script>
</head>
<body>
   <input type="hidden" id="NoClickId" value=@User.Identity.Name />
    <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                @Html.ActionLink("FCNS.ERP", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
            </div>
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li class="dropdown" id="basic-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            基础资料
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li>@Html.ActionLink("客户分类", "Category","Basic", new { state = 0 }, null)</li>
                            <li>@Html.ActionLink("客户资料", "CorS", "Basic", new { state = 0 }, null)</li>
                            <li class="divider"></li>
                            <li>@Html.ActionLink("供应商分类", "Category", "Basic", new { state = 1 }, null)</li>
                            <li>@Html.ActionLink("供应商资料", "CorS", "Basic", new { state = 1}, null)</li>
                            <li class="divider"></li>
                            <li>@Html.ActionLink("面料", "Category", "Basic", new { state = 3 }, null)</li>
                            <li>@Html.ActionLink("款式", "Category", "Basic", new { state = 4 }, null)</li>
                            <li class="divider"></li>
                            <li>@Html.ActionLink("车间部门", "Category", "Basic", new { state = 2 }, null)</li>
                            <li>@Html.ActionLink("工序", "Work", "Basic",null, null)</li>
                            <li class="divider"></li>
                            <li>@Html.ActionLink("用户分类", "Category", "Basic", new { state = 5 }, null)</li>
                            <li>@Html.ActionLink("员工资料", "UserS", "Basic", null, null)</li>
                        </ul>
                    </li>

                    <li class="dropdown" id="order-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            原材料管理
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li>@Html.ActionLink("原材料资料", "Material", "Material", null, null)</li>
                            <li>@Html.ActionLink("原材料采购单", "OrderMaterialNew", "Material", null, null)</li>
                            <li class="divider"></li>
                            <li>@Html.ActionLink("原材料盘点", "MaterialCheck", "Material", null, null)</li>
                            <li>@Html.ActionLink("原材料进出明细表", "MaterialDetail", "Material", null, null)</li>
                            <li class="divider"></li>
                            <li>@Html.ActionLink("原料消耗登记", "MaterialInOrderC", "Material", null, null)</li>
                        </ul>
                    </li>

                    <li class="dropdown" id="order-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            订单管理
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li>@Html.ActionLink("洗板订单明细", "OrderB", "Order", null, null)</li>
                            <li>@Html.ActionLink("新增洗板订单", "OrderBNew", "Order", null, null)</li>
                            <li class="divider"></li>
                            <li>@*@Html.ActionLink("手机交单数据修正", "FixSubmitWork", "Order", null, null)*@</li>
                            <li>@Html.ActionLink("洗水订单明细", "Order", "Order", null, null)</li>
                            <li>@Html.ActionLink("新增洗水订单", "OrderNew", "Order", null, null)</li>
                        </ul>
                    </li>

                    <li class="dropdown" id="pay-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            财务管理
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li>@Html.ActionLink("银行账户", "Bank", "Pay", null, null)</li>
                            <li class="divider"></li>
                            <li>@Html.ActionLink("应收款", "OrderCPay", "Pay", null, null)</li>
                            <li>@Html.ActionLink("应付款", "OrderDPay", "Pay", null, null)</li>
                            <li>@Html.ActionLink("员工待支付", "PersonalPay", "Pay", null, null)</li>
                            <li class="divider"></li>
                            <li>@Html.ActionLink("其它收入", "PayOrder", "Pay", new { flag = 0 }, null)</li>
                            <li>@Html.ActionLink("其它支出", "PayOrder", "Pay", new { flag = 1}, null)</li>
                            <li class="divider"></li>
                            <li>@Html.ActionLink("生成工资表", "BuildGongZi", "Pay", null, null)</li>
                        </ul>
                    </li>

                    <li class="dropdown" id="report-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            经营报表
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li>@Html.ActionLink("库存状态", "StockStatus", "Report", null, null)</li>
                            <li>@Html.ActionLink("客户加工明细表", "CorSDetail", "Report", null, null)</li>
                            <li>@Html.ActionLink("工序明细表", "WorkDetail", "Report", null, null)</li>
                            <li>@Html.ActionLink("个人明细表", "Personal", "Report", null, null)</li>
                            <li class="divider"></li>
                            <li>@Html.ActionLink("收支明细表", "MoneyDetail", "Report", null, null)</li>
                            <li>@Html.ActionLink("原材料盈亏表", "MaterialPL", "Report", null, null)</li>
                            <li>@Html.ActionLink("客户盈亏表", "CorSPL", "Report", null, null)</li>
                            <li>@Html.ActionLink("订单盈亏表", "OrderPL", "Report", null, null)</li>      
                            <li class="divider"></li>
                            <li>@Html.ActionLink("损耗表", "MoneyLoss", "Report", null, null)</li>
                        </ul>
                    </li>

                    <li class="dropdown" id="system-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            系统配置
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li>@Html.ActionLink("企业信息", "Company", "System", null, null)</li>
                            <li class="divider"></li>
                            <li><a href="~/Help/Index.html" target="_blank">帮助文件</a></li>
                            <li class="divider"></li>
                            <li>@Html.ActionLink("注销", "Logout", "Home", null, null)</li>
                        </ul>
                    </li>

                    <li id="mobile-menu"><a href="/Mobile/Index" >移动端</a> </li>
                </ul>

            </div>
        </div>
    </div>
    <div class="container-fluid" style="padding:10px;">
        @RenderBody()
        <hr />
        <footer>
            <p>粤ICP备15067887号</p>
        </footer>
    </div>

</body>
</html>
